﻿using System.Collections.Generic;
using System.Linq;

namespace Fadada.FASC.SDK.DotNetCore.Utils
{
    public class SortParameters
    {
        public static string DictonarySort(Dictionary<string, string> dic)
        {
            var dicSort = from objDic in dic orderby objDic.Key ascending select objDic; //升序排列
            return string.Join("&", dicSort.Select(kvp => $"{kvp.Key}={kvp.Value}"));
        }
    }
}